package cn.itzzx.resume.service.impl;

import cn.itzzx.resume.dao.ResumeDao;
import cn.itzzx.resume.dto.Resume;
import cn.itzzx.resume.service.ResumeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * TODO
 *
 * @author Martin
 * @since 1.0
 */
@Service
public class ResumeServiceImpl implements ResumeService {

    @Autowired
    private ResumeDao resumeDao;

    @Override
    public List<Resume> listAll() {
        return resumeDao.findAll();
    }

    @Override
    public void deleteById(Long id) {
        resumeDao.deleteById(id);
    }

    @Override
    public void save(Resume resume) {
        resumeDao.save(resume);
    }

    @Override
    public void update(Resume resume) {
        resumeDao.saveAndFlush(resume);
    }

}
